(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)))
sqr(0) → 0
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0) → 0
dbl(s(X)) → s(s(dbl(X)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y)) → cons(Y)

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

S is empty.
Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
sqr, add, dbl

They will be analysed ascendingly in the following order:
add < sqr
dbl < sqr

(6) Obligation:

Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
add, sqr, dbl

They will be analysed ascendingly in the following order:
add < sqr
dbl < sqr

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Induction Base:
add(gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
gen_0':s4_0(b)

Induction Step:
add(gen_0':s4_0(+(n6_0, 1)), gen_0':s4_0(b)) →RΩ(1)
s(add(gen_0':s4_0(n6_0), gen_0':s4_0(b))) →IH
s(gen_0':s4_0(+(b, c7_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
dbl, sqr

They will be analysed ascendingly in the following order:
dbl < sqr

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
dbl(gen_0':s4_0(n555_0)) → gen_0':s4_0(*(2, n555_0)), rt ∈ Ω(1 + n5550)

Induction Base:
dbl(gen_0':s4_0(0)) →RΩ(1)
0'

Induction Step:
dbl(gen_0':s4_0(+(n555_0, 1))) →RΩ(1)
s(s(dbl(gen_0':s4_0(n555_0)))) →IH
s(s(gen_0':s4_0(*(2, c556_0))))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dbl(gen_0':s4_0(n555_0)) → gen_0':s4_0(*(2, n555_0)), rt ∈ Ω(1 + n5550)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

The following defined symbols remain to be analysed:
sqr

(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
sqr(gen_0':s4_0(n823_0)) → gen_0':s4_0(*(n823_0, n823_0)), rt ∈ Ω(1 + n8230 + n82302 + n82303)

Induction Base:
sqr(gen_0':s4_0(0)) →RΩ(1)
0'

Induction Step:
sqr(gen_0':s4_0(+(n823_0, 1))) →RΩ(1)
s(add(sqr(gen_0':s4_0(n823_0)), dbl(gen_0':s4_0(n823_0)))) →IH
s(add(gen_0':s4_0(*(c824_0, c824_0)), dbl(gen_0':s4_0(n823_0)))) →LΩ(1 + n8230)
s(add(gen_0':s4_0(*(n823_0, n823_0)), gen_0':s4_0(*(2, n823_0)))) →LΩ(1 + n82302)
s(gen_0':s4_0(+(*(n823_0, n823_0), *(2, n823_0))))

We have rt ∈ Ω(n3) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n3).

(14) Complex Obligation (BEST)

(15) Obligation:

Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dbl(gen_0':s4_0(n555_0)) → gen_0':s4_0(*(2, n555_0)), rt ∈ Ω(1 + n5550)
sqr(gen_0':s4_0(n823_0)) → gen_0':s4_0(*(n823_0, n823_0)), rt ∈ Ω(1 + n8230 + n82302 + n82303)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.

(16) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_0':s4_0(n823_0)) → gen_0':s4_0(*(n823_0, n823_0)), rt ∈ Ω(1 + n8230 + n82302 + n82303)

(17) BOUNDS(n^3, INF)

(18) Obligation:

Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dbl(gen_0':s4_0(n555_0)) → gen_0':s4_0(*(2, n555_0)), rt ∈ Ω(1 + n5550)
sqr(gen_0':s4_0(n823_0)) → gen_0':s4_0(*(n823_0, n823_0)), rt ∈ Ω(1 + n8230 + n82302 + n82303)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.

(19) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_0':s4_0(n823_0)) → gen_0':s4_0(*(n823_0, n823_0)), rt ∈ Ω(1 + n8230 + n82302 + n82303)

(20) BOUNDS(n^3, INF)

(21) Obligation:

Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
dbl(gen_0':s4_0(n555_0)) → gen_0':s4_0(*(2, n555_0)), rt ∈ Ω(1 + n5550)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.

(22) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(23) BOUNDS(n^1, INF)

(24) Obligation:

Innermost TRS:
Rules:
terms(N) → cons(recip(sqr(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y)) → cons(Y)

Types:
terms :: 0':s → cons:nil
cons :: recip → cons:nil
recip :: 0':s → recip
sqr :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
add :: 0':s → 0':s → 0':s
dbl :: 0':s → 0':s
first :: 0':s → cons:nil → cons:nil
nil :: cons:nil
hole_cons:nil1_0 :: cons:nil
hole_0':s2_0 :: 0':s
hole_recip3_0 :: recip
gen_0':s4_0 :: Nat → 0':s

Lemmas:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))

No more defined symbols left to analyse.

(25) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(26) BOUNDS(n^1, INF)